<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('审核单')" />
</head>
<body class="gray-bg">
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<li>
								<label>订单号：</label>
								<input type="text" name="ordernumber"/>
							</li>

							<li>
								<label>订单状态：</label>
								<select name="state">
									<option value="">请选择</option>
									<option selected value="0">未审核</option>
									<option value="1">已审核</option>
									<option value="2">待确认</option>
								</select>
							</li>


							<li class="select-time">
								<label>建单日期：</label>
								<input type="text" readonly class="time-input" id="startTime" placeholder="开始时间" name="mindDate"/>
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
							    <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var prefix = ctx + "settleInfo/settleInfo";

		$(function()  {
            var options = {
                url: prefix + "/examlist",
		        showSearch: false,
		        showRefresh: false,
		        showToggle: false,
		        showColumns: false,
	            clickToSelect:true,
                columns: [
				{
					field : 'ORDERNUMBER',
					title : '订单号'
				},
				{
					field : 'SUMTRADE',
					title : '出款总户数'
				},
				{
					field : 'SUMCOUNT',
					title : '出款总笔数'
				},
				{
					field : 'PAY_MONEY',
					title : '应出款金额(元)',
					formatter: function(value, row, index) {
						return $.table.rmbFormatter(value);
					}
				},
				{
					field : 'SUMAMOUNT',
					title : '交易总金额(元)',
					formatter: function(value, row, index) {
						return $.table.rmbFormatter(value);
					}
				},
				{
				    field : 'ORDERTYPE',
				    title : '订单类型',
					formatter: function(value, row, index) {
						if ("1"==value){
							return "对公";
						}else if("2"==value){
							return "对私";
						}else{
							return "未知";
						}
					}
				},
				{
					field : 'REMITTANCE_WAY',
					title : '出款方式',
					formatter: function(value, row, index) {
						if ("0"==value){
							return '<span style="color:#F08080;">平台</span>';
						}else if("1"==value){
							return "代付";
						}else{
							return "未知";
						}
					}
				},
				{
					field : 'STATE',
					title : '订单状态',
					formatter: function(value, row, index) {
						if ("0"==value){
							return '<span style="color:#F08080;">未审核</span>';
						}else if("1"==value){
							return "已审核";
						}else if("2"==value){
							return "待确认";
						}else{
							return "未知";
						}
					}
				},
				{
					field : 'INDATE',
					title : '建单日期',
					formatter: function(value, row, index) {
						return row.INDATE+' '+row.INTIME;
					}
				},
				{
					field : 'ADD_BILLS_PERSON',
					title : '建单人'
				},
				{
					field : 'CHECK_PERSON',
					title : '复核人'
				},

				{
					field : 'PAYMONEY_PERSON',
					title : '出款人'
				},]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>